#ifndef KINTROWIDGET_H
#define KINTROWIDGET_H

#include "../screencapsdk_global.h"
#include <QWidget>

namespace kdk {

enum ViewType{
    IconView,
    ListView
};

/**
 * @defgroup FormModule
 * @since 2.5
 */
class KIntroWidgetPrivate;

class SCREENCAPSDK_EXPORT KIntroWidget :public QWidget
{
    Q_OBJECT
public:
    KIntroWidget(QWidget *parent =nullptr);

    /**
     * @brief 设置视图样式
     * @param type
     */
    void setViewType(ViewType type);

    /**
     * @brief 设置主文本
     * @param str
     */
    void setMainLabel(QString str);

    /**
     * @brief 设置次级文本
     * @param str
     */
    void setSubLabel(QString str);

    /**
     * @brief 设置圆角
     * @param radius
     */
    void setBorderRadius(int radius);

    /**
     * @brief 设置圆角
     * @param bottomLeft
     * @param topLeft
     * @param topRight
     * @param bottomRight
     */
    void setBorderRadius(int bottomLeft,int topLeft,int topRight,int bottomRight);

    /**
     * @brief 设置标题颜色
     * @param color
     */
    void setTitleColor(QColor color);

Q_SIGNALS:
    void rightClick(QPoint point);

protected:
    void paintEvent(QPaintEvent* event);
    bool eventFilter(QObject *watched, QEvent *event);
    QSize sizeHint() const override;
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);

private:
    Q_DECLARE_PRIVATE(KIntroWidget)
    KIntroWidgetPrivate *const d_ptr;
};

}

#endif // KINTROWIDGET_H
